using System;
namespace System.Windows.Controls
{
	internal struct OrientedSize
	{
		private Orientation _orientation;
		private double _direct;
		private double _indirect;
		public Orientation Orientation
		{
			get
			{
				return this._orientation;
			}
		}
		public double Direct
		{
			get
			{
				return this._direct;
			}
			set
			{
				this._direct = value;
			}
		}
		public double Indirect
		{
			get
			{
				return this._indirect;
			}
			set
			{
				this._indirect = value;
			}
		}
		public double Width
		{
			get
			{
				if (this.Orientation != 1)
				{
					return this.Indirect;
				}
				return this.Direct;
			}
			set
			{
				if (this.Orientation == 1)
				{
					this.Direct = value;
					return;
				}
				this.Indirect = value;
			}
		}
		public double Height
		{
			get
			{
				if (this.Orientation == 1)
				{
					return this.Indirect;
				}
				return this.Direct;
			}
			set
			{
				if (this.Orientation != 1)
				{
					this.Direct = value;
					return;
				}
				this.Indirect = value;
			}
		}
		public OrientedSize(Orientation orientation)
		{
			this = new OrientedSize(orientation, 0.0, 0.0);
		}
		public OrientedSize(Orientation orientation, double width, double height)
		{
			this._orientation = orientation;
			this._direct = 0.0;
			this._indirect = 0.0;
			this.Width = width;
			this.Height = height;
		}
	}
}
